<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
<script type="text/javascript" src="http://127.0.0.1/CodeIgniter/assets/development-bundle/ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="http://127.0.0.1/CodeIgniter/assets/development-bundle/ui/jquery.ui.autocomplete.js"></script>
	
	<script>
	$(function() {
		var afilliates = new Array(); 
			<?php
			for ($i=0; $i<=count($names)-1; $i++)
			{
			echo "afilliates[".$i."] = '".$names[$i]."';";
			}
			?>
		$( "#search_afilliates" ).autocomplete({
			source: afilliates,
			matchContains: true,
			minChars: 2,
			autoFill: true
		});
	});
	</script>
    <style type="text/css">
<!--
.Estilo1 {font-size: x-large}
.Estilo11 {font-size: smaller; font-style: italic; }
-->
    </style>
</head>

<body>
<table width="538" border="0" align="right">
        <tr>
          <td colspan="3">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="3"><div align="center"><span class="Estilo1"><strong>LISTADO DE Agencias</strong> en Sistema</span></div></td>
        </tr>
        <tr>
          <td colspan="3" valign="middle"><div align="center">--------------------------------------------------------------------------------</div></td>
        </tr>
        <tr>
          <td width="282" valign="middle"><div align="center"><img src="http://127.0.0.1/CodeIgniter/img/afiliado.jpg" width="62" height="59" /></div></td>
          <td width="246" colspan="2" rowspan="2"><div align="center"><img src="http://127.0.0.1/CodeIgniter/img/agregar.jpg" /></div>            
            <div align="center" class="Estilo11">Esperando su Confirmación</div></td>
  </tr>
        <tr>
          <td valign="middle"><div align="center" class="Estilo11">Afiliado</div></td>
  </tr>
        <tr>
          <td colspan="3"><div align="center">----------------------------------------------------------------------------------</div></td>
        </tr>
        <tr>
          <td colspan="3"><div align="center"></div></td>
        </tr>
        <tr>
          <td colspan="3">&nbsp;</td>
        </tr>
        <?php 
		foreach ($info_Hotel as $aux)
		{
			$nameHotel = $aux['name'];
		}
		foreach ($Agencies as $row)
		{
		?>
        <tr>
          <td colspan="3"><table width="100%" border="0">
            <tr>
              <td width="16%" rowspan="6"><div></div></td>
              <td width="68%"><strong>Nombre:</strong> <?php echo $row['nameTravelagency'];?></td>
              <td width="16%" rowspan="6">
              <div>
              <?php
			 if (in_array($row['id_travel_agency'],$statusW))
			 {
			 ?>          
			 <img src="http://127.0.0.1/CodeIgniter/img/agregar.jpg" /></div><a href="<?php echo base_url(); ?>/Travelagencycontroller/confirmRequest/<?php echo $row['id_travel_agency']; ?>/<?php echo $id_hotel; ?>/<?php echo $row['nameTravelagency'];?>/<?php echo $nameHotel;?>/<?php echo $username; ?>/<?php echo $id_user; ?>">SI</a> / <a href="#">NO</a>
             <?php
			 } elseif (in_array($row['id_travel_agency'],$statusA)) {
			 ?>          
			 <img src="http://127.0.0.1/CodeIgniter/img/afiliado.jpg" /><a href="#">Detalles</a></div>
             <?php
			 } else {
			 ?>
            <a href="#">Ver detalles de agencia</a>
            <?php		  
			} //cierro el else
			?>            </td>
            </tr>
            <tr>
              <td><strong>Ubicacion</strong>: <?php echo $row['namePlace'];?></td>
            </tr>
            <tr>
              <td><strong>Dirección: </strong><?php echo $row['comercialAddress'];?></td>
            </tr>
            <tr>
              <td><strong>Email:</strong> <?php echo $row['email'];?></td>
            </tr>
            <tr>
              <td><strong>Pag Web:</strong><?php echo $row['pagWeb'];?></td>
            </tr>
          </table></td>
 		 </tr>
         <?php } //end foreach?>
      </table>
</body>
</html>
